package it.ilgrv.demiurgo.persistence.tables.faction;

import it.ilgrv.demiurgo.persistence.tables.inscription.Availableassociation;
import it.ilgrv.demiurgo.persistence.tables.skill.Teacher;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the association database table.
 * 
 */
@Entity
public class Association extends it.ilgrv.demiurgo.persistence.GenericTable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int id;

	private int associationType_id;

	private String description;

	private String name;

	private int version;

	//bi-directional many-to-one association to Teacher
    @ManyToOne
	private Teacher teacher;

	//bi-directional many-to-one association to Availableassociation
	@OneToMany(mappedBy="association")
	private Set<Availableassociation> availableassociations;

	//bi-directional many-to-one association to Member
	@OneToMany(mappedBy="association")
	private Set<Member> members;

	//bi-directional many-to-one association to Title
	@OneToMany(mappedBy="association")
	private Set<Title> titles;

    public Association() {
    }

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getAssociationType_id() {
		return this.associationType_id;
	}

	public void setAssociationType_id(int associationType_id) {
		this.associationType_id = associationType_id;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public Teacher getTeacher() {
		return this.teacher;
	}

	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}
	
	public Set<Availableassociation> getAvailableassociations() {
		return this.availableassociations;
	}

	public void setAvailableassociations(Set<Availableassociation> availableassociations) {
		this.availableassociations = availableassociations;
	}
	
	public Set<Member> getMembers() {
		return this.members;
	}

	public void setMembers(Set<Member> members) {
		this.members = members;
	}
	
	public Set<Title> getTitles() {
		return this.titles;
	}

	public void setTitles(Set<Title> titles) {
		this.titles = titles;
	}
	
}